<template>
  <div class="detail-card">
    <div class="detail-card-top">
      <img :src="icons[icon]" alt="" />
      <div class="title">
        {{ title }}
      </div>
    </div>
    <div class="detail-card-content">
      <slot></slot>
    </div>
  </div>
</template>
<script>
const icon_1 = require("./img/1.png");
const icon_2 = require("./img/2.png");
const icon_3 = require("./img/3.png");
const icon_4 = require("./img/4.png");
const icon_5 = require("./img/5.png");

export default {
  name: "DetailCard",
  props: {
    title: String,
    icon: String
  },
  data() {
    return {
      icons: {
        1: icon_1,
        2: icon_2,
        3: icon_3,
        4: icon_4,
        5: icon_5
      }
    };
  },
  created() {},
  methods: {}
};
</script>
<style lang="scss">
.detail-card {
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  background: #2c2e3f;
  padding: 0 30px;
  .detail-card-top {
    width: 100%;
    height: 88px;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 14px;
    img {
      width: 29px;
      height: 29px;
      margin-right: 22px;
    }
    .title {
      font-size: 18px;
      color: #fff;
    }
  }
  .panel-content {
    padding: 10px;
  }
}
</style>
